<script>
	export default {
		onLaunch: function() {
			console.warn('当前组件仅支持 uni_modules 目录结构 ，请升级 HBuilderX 到 3.1.0 版本以上！')
			console.log('App Launch')
			wx.loadFontFace({
				family: 'MyFont',
				global: true,
				source: 'url("https://ba.fuliaoxx.com/font/font.ttf")', //线上字体链接  
				success(res) {
					console.log('font load sucess', res.status)
				},
				fail: function(res) {
					console.log('font load fail', res.status)
				},
				complete: function(res) {
					console.log(res.status)
				}
			});

		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="less">
	/*每个页面公共css */
	@import './assets/css/base.less';
	@import './assets/css/reset.less';
	@import './assets/css/style.less';
</style>
<style lang="scss">
	@import './uni.scss';
</style>

<style lang="scss">
	@font-face {
		font-family: 'MyFont';
		src: url('/static/font.ttf') format('truetype');
		/* 注意路径要正确指向 static 目录下的字体文件 */
	}

	* {
		font-family: 'MyFont', sans-serif;
	}
</style>